<?php echo doctype('html5'); ?>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="document-type" content="Web Page" />
        <meta http-equiv="imagetoolbar" content="no" />
        
        <meta name="HandheldFriendly" content="True">
        <meta name="MobileOptimized" content="320">
        <meta name="viewport" content="width=device-width">
	<meta http-equiv="cleartype" content="on">
        
        <title>
            <?php echo str_replace(array('%s', '%p'), array($this->config->item('site_name'), $pagetitle), $this->config->item('pagetitle')); ?>
        </title>
        
        <?php echo output_ui(); ?>
        
    </head>
    
    <body class="<?php echo strtolower(get_browser_name()); ?><?php echo is_browser('MSIE') ? ' ie-'.browser_version(true) : null; ?>">
        
        {* Set the template name for CSS/JS *}
        <div id="main_nologin_template">
            
            <noscript>
                <div id="nojs_wrapper">
                    <div id="nojs_inner">
                        <h3><?php echo $this->lang->line('no_js_header'); ?></h3>
                        <?php echo $this->lang->line('no_js_msg', array('%s' => $this->config->item('site_name'))); ?>
                    </div>
                </div>
            </noscript>
            
            <div id="main_wrapper">
                
                {* Body *}
                <div id="body_wrapper">
                    {* Place the page content *}
                    {$content}
                </div>
                
                {* Page footer *}
                <div id="footer_wrapper">
                    <div id="footer_version">
                        <a href="<?php echo $this->config->item('parent_url'); ?>" target="_blank"><?php echo $this->lang->line('vanilla_version', array('%v' => $this->config->item('vdb_version'), '%s' => $this->config->item('site_name'))); ?></a>

                        <span id="total_elapsed_time"><?php echo $this->lang->line('elapsed_time'); ?>: {elapsed_time} <?php echo strtolower($this->lang->line('date_seconds')); ?></span>
                    </div>

                    <div id="footer_copyright">
                        <?php echo $this->lang->line('licence', array('%s' => $this->config->item('site_name'), '%d' => date('Y'), '%u' => 'http://www.gnu.org/copyleft/gpl.html')); ?>
                    </div>

                    <?php if(count($browsers) > 0 || !is_null($lang_form)) : ?>
                        <ul id="browsers_wrapper">
                            <?php if(!is_null($lang_form)) : ?>
                                <li id="change_lang_wrapper">
                                    <?php echo output_form(array('fields' => $lang_form, 'show_required' => false, 'end' => false)); ?>
                                    <noscript><?php echo output_form(array('show_required' => false, 'start' => false)); ?></noscript>
                                </li>
                            <?php endif; ?>
                                
                            <li id="works_with_browser"><?php echo $this->lang->line('works_with_browser'); ?></li>
                            <?php foreach($browsers as $browser) : ?>
                                <li>
                                    <a href="<?php echo $browser['url'] ?>" target="_blank" class="browser_icon"><img
                                            src="<?php echo interface_url($browser['icon'], 'img'); ?>"
                                            alt="<?php echo $browser['name']; echo !empty($browser['version']) ? ' '.$browser['version'] : ''; ?>"
                                            title="<?php echo $browser['name']; echo !empty($browser['version']) ? ' '.$browser['version'] : ''; ?>" /></a>
                                </li>
                            <?php endforeach; ?>
                        </ul>
                    <?php endif;?>
                </div>
            
            </div>
        
            <div id="_loading">
                <div class="img">
                    <img src="<?php echo interface_url('/img/ajax-loader.gif'); ?>" alt="" />
                </div>
            </div>
        
        </div>
        
        <?php echo output_js_lang(); ?>
        
    </body>
</html>